﻿<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>后管理台</title>
    <style type="text/css">
        .white-menu .x-menu
        {
            background: white !important;
        }
    </style>
</head>
<body>
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <script type="text/javascript">
        Ext.ns("Northwind");

        Northwind = {
            hashCode: function (str) {
                var hash = 1315423911;

                for (var i = 0; i < str.length; i++) {
                    hash ^= ((hash << 5) + str.charCodeAt(i) + (hash >> 2));
                }

                return (hash & 0x7FFFFFFF);
            },

            addTab: function (config) {
                if (Ext.isEmpty(config.url, false)) {
                    return;
                }

                var tp = Ext.getCmp('tpMain');
                var id = this.hashCode(config.url);
                var tab = tp.getComponent(id);

                if (!tab) {
                    tab = tp.addTab({
                        id: id.toString(),
                        title: config.title,
                        iconCls: config.icon || 'icon-applicationdouble',
                        closable: true,
                        autoLoad: {
                            showMask: true,
                            url: config.url,
                            mode: 'iframe',
                            noCache: true,
                            maskMsg: "正在加载 '" + config.title + "'...",
                            scripts: true,
                            passParentSize: config.passParentSize
                        }
                    });
                } else {
                    tp.setActiveTab(tab);
                    Ext.get(tab.tabEl).frame();
                }
            }
        };
    </script>
    <ext:Viewport ID="ViewPort1" runat="server">
        <Items>
            <ext:BorderLayout runat="server">
                <North>
                    <ext:Toolbar ID="tbHeader" Height="25" runat="server">
                        <Items>
                            <ext:ToolbarFill ID="fill1" runat="server" />
                            <ext:Button ID="Button1" runat="server"  Text='<%# "总访问量:"+this.ViewData["TotalAccessCount"]+"次" %>'
                                AutoDataBind="true" />

                            <ext:Button runat="server"  Text='<%# "今日访问量:"+this.ViewData["TodayAccessCount"]+"次" %>'
                                AutoDataBind="true" />
                           
                            <ext:ToolbarSeparator ID="ToolbarSeparator2" runat="server" />
                            <ext:Button ID="btnName" runat="server" Icon="StatusOnline" Text='<%# this.ViewData["Username"] %>'
                                AutoDataBind="true" />
                            <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server" />
                            <ext:Button ID="btnLogout" runat="server" Icon="LockGo" Text="登出">
                                <DirectEvents>
                                    <click url="/Admin/Logout.html" />
                                </DirectEvents>
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </North>
                <West Split="true" CollapseMode="Mini" MarginsSummary="0 0 4 4">
                    <ext:Panel ID="Panel1" runat="server" Title="导航" Width="225">
                        <Items>
                            <ext:Panel ID="acCustomers" runat="server" Border="false" HideLabel="true">
                                <Items>
                                    <ext:MenuPanel Layout="FitLayout" runat="server" Border="false" SaveSelection="false"
                                        Cls="white-menu">
                                        <menu>
                                            <items>
                                                    <ext:MenuItem ID="mnIndexImageList" runat="server" Text="首页图片"
                                                        Icon="Report">
                                                        <CustomConfig>
                                                            <ext:ConfigItem Name="url" Value="/admin/IndexImageEdit.html" Mode="Value" />
                                                        </CustomConfig>
                                                    </ext:MenuItem>
                                                    
                                                   <%--  <ext:MenuItem ID="mnLinksList" runat="server" Text="友情链接"
                                                        Icon="Report">
                                                        <CustomConfig>
                                                            <ext:ConfigItem Name="url" Value="/admin/LinksEdit.html" Mode="Value" />
                                                        </CustomConfig>
                                                    </ext:MenuItem>--%>

                                                    <ext:MenuItem ID="mnNewMovieList" runat="server" Text="新片编辑"
                                                        Icon="Report">
                                                        <CustomConfig>
                                                            <ext:ConfigItem Name="url" Value="/Admin/NewMovieEdit.html" Mode="Value" />
                                                        </CustomConfig>
                                                    </ext:MenuItem>

                                                    
                                                     <ext:MenuItem ID="mnPlaytimeList" runat="server" Text="电影排片"
                                                        Icon="Report">
                                                        <CustomConfig>
                                                            <ext:ConfigItem Name="url" Value="/Admin/PlaytimeEdit.html" Mode="Value" />
                                                        </CustomConfig>
                                                    </ext:MenuItem>

                                                     <ext:MenuItem ID="mnActivityList" runat="server" Text="缤纷活动"
                                                        Icon="Report">
                                                        <CustomConfig>
                                                            <ext:ConfigItem Name="url" Value="/admin/ActivitysEdit.html" Mode="Value" />
                                                        </CustomConfig>
                                                    </ext:MenuItem>

                                                     <ext:MenuItem ID="mnMessageList" runat="server" Text="留言管理"
                                                        Icon="Report">
                                                        <CustomConfig>
                                                            <ext:ConfigItem Name="url" Value="/admin/MessagesEdit.html" Mode="Value" />
                                                        </CustomConfig>
                                                    </ext:MenuItem>
                                                </items>
                                            <listeners>
                                                    <ItemClick Handler="Northwind.addTab({ title: menuItem.text, url: menuItem.url, icon: menuItem.iconCls, passParentSize: menuItem.passParentSize});" />
                                                </listeners>
                                        </menu>
                                    </ext:MenuPanel>
                                </Items>
                            </ext:Panel>
                        </Items>
                    </ext:Panel>
                </West>
                <Center MarginsSummary="0 0 4 0">
                    <ext:TabPanel ID="tpMain" runat="server" EnableTabScroll="true">
                        <Items>
                            <ext:Panel ID="Panel2" Title="Home" runat="server">
                                <AutoLoad Url="/admin/Dashboard.html" Mode="IFrame" ShowMask="true" MaskMsg="加载 控制面板..." />
                            </ext:Panel>
                        </Items>
                        <plugins>
                            <ext:TabCloseMenu ID="TabCloseMenu1" runat="server" />
                        </plugins>
                    </ext:TabPanel>
                </Center>
            </ext:BorderLayout>
        </Items>
    </ext:Viewport>
</body>
</html>
